package util.system;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class PinGenerator {

	/**
	 * @param args
	 */
	public List<String> StringNumberGenerator(int n, int l) {
		char[] alphNum = "1234567890".toCharArray();

		Random rnd = new Random();
		int randLength = n;
		// String randStringNumber[] = new String[randLength];

		List<String> rsn = new ArrayList<String>();
		// String test="";
		for (int j = 1; j < randLength; j++) {
			StringBuilder sb = new StringBuilder(l);
			for (int i = 0; i < l; i++) {
				sb.append(alphNum[rnd.nextInt(alphNum.length)]);
			}

			if (rsn.contains(sb.toString())) {
				System.out.println("Udah di add");
			}
			rsn.add(sb.toString());
		}
		return rsn;
	}
}
